﻿using System.Collections;
using System.Collections.Generic;

 /// <summary>
 ///此部分代码由工具生成 
 ///请自己修改类、成员变量方法以及方法的大小写 
 ///请自己添加相关注释 
 /// </summary>

public class FruitGiven
{
	public FruitEnum iFruitid;
	public int iGivenNum;

	public FruitGiven(){}

    public FruitGiven(Dictionary<string, object> dic)
	{
		this.LoadFromDictionary(dic);
	}

	public void LoadFromDictionary(Dictionary<string, object> dic)
	{
        this.iFruitid = (FruitEnum)DictionaryUnity.GetSafeIntValue(dic, "fruitid");
        this.iGivenNum = DictionaryUnity.GetSafeIntValue(dic, "givenum");

	}

    public Dictionary<string, object> ToDic()
    {
        Dictionary<string, object> dic = new Dictionary<string, object>();
        dic["fruitid"] = (int)this.iFruitid;
        dic["givenum"] = this.iGivenNum;
        return dic;
    }
}

public class FruitData
{
    public int iIndex;
    public FruitEnum iFruitId;
	public int iNum;

	public FruitData(){}

    public FruitData(Dictionary<string, object> dic)
	{
		this.LoadFromDictionary(dic);
	}

	public void LoadFromDictionary(Dictionary<string, object> dic)
	{
        this.iIndex = DictionaryUnity.GetSafeIntValue(dic, "index");
        this.iFruitId = (FruitEnum)DictionaryUnity.GetSafeIntValue(dic, "fruitid");
        this.iNum = DictionaryUnity.GetSafeIntValue(dic, "num");
	}

    public  Dictionary<string, object> ToDic(){
        Dictionary<string, object> dic = new Dictionary<string, object>();
        dic["index"] = this.iIndex;
        dic["fruitid"] = (int)this.iFruitId;
        dic["num"] = this.iNum;
        return dic;
    }
}